package com.ziqikeji.simplemvc.business;

import com.ziqikeji.simplemvc.system.annotation.Controller;
import com.ziqikeji.simplemvc.system.annotation.Autowired;
import com.ziqikeji.simplemvc.system.annotation.RequestMapping;
import com.ziqikeji.simplemvc.system.core.View;

/**
 * 学生控制器
 * @author dpf
 */
@Controller
@RequestMapping(value = "student")
public class StudentController {
    @Autowired
    private StudentService studentService;
    @Autowired
    private StudentEditService studentEditService;

    public StudentController(){
    }

    @RequestMapping(value = "/listAll")
    public View listAll() {
        String student = this.studentService.get("1");
        return new View("学生列表页面,方法：" + student);
    }

    @RequestMapping(value = "/edit")
    public View edit() {
        String string = this.studentEditService.get("2");
        return new View("学生编辑页面,方法：" + string);
    }
}
